﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;

namespace DBLibrary.Model.pojo
{
    public class AlarmLevelData   //报警数据表
    {
        public event PropertyChangedEventHandler PropertyChanged = delegate { };
        private int _SensorId;                      //[系统序号]
        private float _alarmValue;                  //[报警值]
        private float _currentValue;                //[当前值]
        private DateTime _Time;                     //[时间]
        private string _alarmMsg;                   //[报警信息]
        private int _status;                        //[传感器状态]
        private int  _countValue;                   //[统计值]
        private string _Describe;                   //[备注]
        private int _isUpload;                      //[上传否]
        private int _isUpload2;                     //[上传否2]
        private int _isUpload3;                     //[上传否3]
        private int _isUpload4;                     //[上传否4]
        private string _Guards;                     //[措施]
        private string _reason;                     //[原因]
        private int _hotBack1;
        private int _hotBack2;
        private float _StandardizeSolubility;       //[校准浓度]

        [DisplayName("传感器编号")]
        public int SensorId {
            get => _SensorId;
            set
            {
                _SensorId = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("SensorId"));
                }
            }
        }
        [DisplayName("报警值")]
        public float AlarmValue {
            get => _alarmValue;
            set
            {
                _alarmValue = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("AlarmValue"));
                }
            }
        }
        [DisplayName("当前值")]
        public float CurrentValue {
            get => _currentValue;
            set
            {
                _currentValue = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("CurrentValue"));
                }
            }
        }
        [DisplayName("时间")]
        public DateTime Time {
            get => _Time;
            set
            {
                _Time = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Time"));
                }
            }
        }
        [DisplayName("报警信息")]
        public string AlarmMsg {
            get => _alarmMsg;
            set
            {
                _alarmMsg  = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("AlarmMsg"));
                }
            }
        }
        [DisplayName("传感器状态")]
        public int Status {
            get => _status;
            set
            {
                _status = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Status"));
                }
            }
        }
        [DisplayName("统计值")]
        public int CountValue {
            get => _countValue;
            set
            {
                _countValue = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("CountValue"));
                }
            }
        }
        [DisplayName("备注")]
        public string Describe {
            get => _Describe;
            set
            {
                _Describe = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Describe"));
                }
            }
        }

        public int IsUpload {
            get => _isUpload;
            set
            {
                _isUpload = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("IsUpload"));
                }
            }
        }
        public int IsUpload2 {
            get => _isUpload2;
            set
            {
                _isUpload2 = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("IsUpload2"));
                }
            }
        }
        public int IsUpload3 {
            get => _isUpload3;
            set
            {
                _isUpload3 = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("IsUpload3"));
                }
            }
        }
        public int IsUpload4 {
            get => _isUpload4;
            set
            {
                _isUpload4 = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("IsUpload4"));
                }
            }
        }
        [DisplayName("措施")]
        public string Guards {
            get => _Guards;
            set
            {
                _Guards = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Guards"));
                }
            }
        }
        [DisplayName("原因")]
        public string Reason {
            get => _reason;
            set
            {
                _reason = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Reason"));
                }
            }
        }
        [DisplayName("校准浓度")]
        public float StandardizeSolubility {
            get => _StandardizeSolubility;
            set
            {
                _StandardizeSolubility = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("StandardizeSolubility"));
                }
            }
        }
        public int HotBack1 {
            get => _hotBack1;
            set
            {
                _hotBack1 = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("HotBack1"));
                }
            }
        }
        public int HotBack2 {
            get => _hotBack2;
            set
            {
                _hotBack2 = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("HotBack2"));
                }
            }
        }
    }
}
